home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / addmemhandler.c < prev    next >
Text File  |  1996-10-24  |  1KB  |  66 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: addmemhandler.c,v 1.5 1996/10/24 15:50:41 aros Exp $
  4.     $Log: addmemhandler.c,v $
  5.     Revision 1.5  1996/10/24 15:50:41  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:55:56  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:02  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang:
  18. */
  19. /*****************************************************************************
  20.  
  21.     NAME */
  22.     #include <exec/execbase.h>
  23.     #include <clib/exec_protos.h>
  24.  
  25. AROS_LH1(void, AddMemHandler,
  26.  
  27. /*  SYNOPSIS */
  28.     AROS_LHA(struct Interrupt *, memHandler, A1),
  29.  
  30. /*  LOCATION */
  31.     struct ExecBase *, SysBase, 129, Exec)
  32.  
  33. /*  FUNCTION
  34.     Add some function to be called if the system is low on memory.
  35.  
  36.     INPUTS
  37.     memHandler - An Interrupt structure to add to the low memory
  38.              handler list.
  39.  
  40.     RESULT
  41.  
  42.     NOTES
  43.  
  44.     EXAMPLE
  45.  
  46.     BUGS
  47.  
  48.     SEE ALSO
  49.  
  50.     INTERNALS
  51.  
  52.     HISTORY
  53.     8-10-95    created by m. fleischer
  54.  
  55. ******************************************************************************/
  56. {
  57.     AROS_LIBFUNC_INIT
  58.     /* Protect the low memory handler list */
  59.     Forbid();
  60.     /* Nothing spectacular: Just add the new node */
  61.     Enqueue((struct List *)&SysBase->ex_MemHandlers,&memHandler->is_Node);
  62.     Permit();
  63.     AROS_LIBFUNC_EXIT
  64. } /* AddMemHandler */
  65.  
  66.